<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>供应商查询</title>
    <include file="Template/head"/>
    <style>
        .ul-s1{
            border-top: 1px solid #c0c0c0;
            line-height:30px;
            font-size:15px;
        }
        .li-s1{
            border-bottom: 1px solid #c0c0c0;
            padding-top:10px;
        }
        .li-t1{
            padding-top: 10px;
        }
        .text-c1{
            color:#DCAC6C;
        }
        .text-c2{
            color:#33b3b8;
        }
    </style>
</head>
<body>
<div class="actNav">
    <div class="doRefresh">供应商查询</div>
    <a href="javascript:history.go(-1);" class="back"></a>
    <a href="{:U('Index/index')}" class="home"></a>
</div>
<div class="container">
    <br>
    <form method="post" action="{:U('Personal/providerQuery')}">
        <div class="row">
            <div class="col-xs-12"><b>输入目的地,或供应商名称:</b></div>
            <div class="col-xs-9" style="margin-top:10px;">
                <input type="text" class="form-control name" name="name" value="{$name}">
            </div>
            <div class="col-xs-3" style="margin-top:10px;">
                <input type="submit" class="btn btn-success" value="搜索">
            </div>
        </div>
    </form>
    <br>

    <if condition="$Think.POST.name eq ''">
    <if condition="$list[0]['id'] neq ''">
    <ul class="ul-s1">
        <h3 class="text-center">本月最新加盟</h3>
        <volist name="list" id="vo" offset="0" length="4">
            <div class="jumpToProviderList" id="{$vo.id}">
                <li>供销商名称: {$vo.name}</li>
                <li>公司全称: {$vo.full_name}</li>
                <li>业务联系人: {$vo.contact_person}</li>
                <li>经销目的地: {$vo.destinations}</li>
            </div>
            <li>联系人电话: <a href="tel:{$vo.mobile}" class="text-c2">{$vo.mobile}</a></li>
            <li class="li-s1"></li>
        </volist>
        <span class="text-c1 clickToMoreForProviderInfo">点击查看更多</span>

        <div class="hiddenProviderInfo" hidden>
        <volist name="list" id="vo" offset="4">
            <div class="jumpToProviderList" id="{$vo.id}">
                <li>供销商名称: {$vo.name}</li>
                <li>公司全称: {$vo.full_name}</li>
                <li>业务联系人: {$vo.contact_person}</li>
                <li>经销目的地: {$vo.destinations}</li>
            </div>
            <li>联系人电话: <a href="tel:{$vo.mobile}" class="text-c2">{$vo.mobile}</a></li>
            <li class="li-s1"></li>
        </volist>
        </div>
    </ul>
    </if>
    <else/>
    <ul class="ul-s1" style="margin-top:20px;">
    <if condition="$queryList[0]['id'] neq ''">
    <foreach name="queryList" item="v">
        <div class="jumpToProviderList" id="{$v.id}">
            <li class="li-t1">供销商名称: {$v.name}</li>
            <li>公司全称: {$v.full_name}</li>
            <li>业务联系人: {$v.contact_person}</li>
            <li>经销目的地: {$v.destinations}</li>
        </div>
        <li>联系人电话: <a href="tel:{$v.mobile}" class="text-c2">{$v.mobile}</a></li>
        <li class="li-s1"></li>
    </foreach>
    <else/>
        <h4 class="text-center">
            <p>抱歉，暂时没有<span class="text-c2"> {$name} </span>的信息</p>
            我们已做登记，并会尽快完善</h4>
    </if>
    </ul>
    </if>

    <div class="modal fade popWin bs-example-modal-sm" id="myModalmob" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">提示</h4>
                </div>
                <div class="modal-body text-center">
                    <p class="tipsBox"><i class="suc"></i></p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-warning" data-dismiss="modal" aria-label="Close">确认</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal" aria-label="Close">取消</button>
                </div>
            </div>
        </div>
    </div>
</div>
<footer class="footer">
    <include file="Template/foot"/>
</footer>
<script>
    $("form").submit(function (event) {
        if (!$(".name").val()) {
            $('#myModalmob').modal({backdrop: 'static', keyboard: false});
            $("#myModalmob").modal();
            $(".tipsBox").html('请输入您要搜索的信息!');
            return false;
        }
    })
</script>
</body>
</html>
